package cn.zsb.config;

import cn.zsb.printer.TextPaper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @author oldliu
 * @since 1.0
 */
@Configuration
public class PrinterConfig {
    @Bean(name = "a4paper")
    @Scope("singleton")
    public TextPaper a4(){
        TextPaper p=new TextPaper();
        p.setLines(20);
        p.setWords(18);
        return p;
    }
    @Bean(name = "b4paper")
    public TextPaper b5(){
        TextPaper p=new TextPaper();
        p.setLines(12);
        p.setWords(9);
        return p;
    }
}
